home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / tde40.zip / linux.prt < prev    next >
Text File  |  1994-06-05  |  4KB  |  91 lines

  1.                             Linux port notes
  2.                               Frank Davis
  3.                               June 5, 1994
  4.  
  5.  
  6. This file contains some notes and references others might find useful
  7. for porting MS-DOS software to Linux.  Being that Linux comes with no
  8. printed manuals (I get Linux via ftp from sunsite), printed reference
  9. books are *really* useful.
  10.  
  11.  
  12. 1) References:
  13.  
  14.    This book is a good source for POSIX examples.  Although there is no
  15.    mention of Linux in the book, I think it is a very good reference:
  16.  
  17.       W. Richard Stevens, _Advanced Programming in the UNIX Environment_,
  18.         744 pages, Addison-Wesley Publishing Company, Reading, Mass., 1992,
  19.         ISBN 0-201-56317-7.
  20.  
  21.  
  22.    Much smaller and more luggable, this book is a good source and has a nice
  23.    POSIX library function summary section (about half the book):
  24.  
  25.       Donald A. Lewine, _POSIX Programmer's Guide_, 597 pages, O'Reilly &
  26.         Associates, Inc., Sebastopol, California, 1991, ISBN 0-937175-73-0.
  27.  
  28.  
  29.    The curses reference I used was:
  30.  
  31.       Berny Goodheart, _UNIX Curses Explained_, 287 pages, Prentice Hall,
  32.         New York, New York, 1991, ISBN 0-13-931957-3.
  33.  
  34.  
  35.    Most all of the Standard C in TDE ported with no problem.  One reference
  36.    manual that has very good material for UNIX as well as PC C compilers is:
  37.  
  38.       Samuel P. Harbison and Guy L. Steele, Jr., _C:  A Reference Manual_,
  39.         392 pages, Prentice Hall, Englewood Cliffs, New Jersey, 1991,
  40.         ISBN 0-13-110933-2.
  41.  
  42.  
  43.  
  44. 2) One of the things that caused a problem in the original port of TDE
  45.    to Linux was the way the command shell handles command line arguments.
  46.    I'm not sure if it's true in all UNIX shells, but the bash shell in
  47.    Linux expands file names.  So, when I thought TDE was expecting 5 or 6
  48.    command line arguments, it actually received 130 arguments.  For example:
  49.  
  50.                 tde -f "this|that" *.c
  51.  
  52.    The *.c is expanded to about 35-40 command line arguments in a TDE
  53.    source subdirectory.  There wasn't enough room in TDE to store those
  54.    arguments, which caused a malfunction.
  55.  
  56.    There is no equivalent DOS find first/find next function in POSIX,
  57.    at least as far as I can tell.  So, things like *.h or *.doc will not
  58.    work.  The POSIX readdir( ) function simply reads all directory entries.
  59.    There is a ftw( ) function, which stands for file tree walk, but I
  60.    haven't been able to use it.
  61.  
  62.  
  63.  
  64. 3) Normal convention in MS-DOS is to end text lines with <CR><LF>.
  65.    In UNIX, lines are terminated with <LF>.   When MS-DOS text files
  66.    are edited with many UNIX text editors, the <CR> looks like a ^M at
  67.    the end of lines.
  68.  
  69.    Another problem that I have run into is the way printers handle
  70.    these files, too.  When a UNIX text file is printed on an PC printer,
  71.    the result is often a "stair-step" effect -- lines look like
  72.    descending stairs from left to right.
  73.  
  74.  
  75.  
  76. 4) In Linux, there are several files in the /proc directory that contain
  77.    neat system info.  I used the /proc/meminfo file to find the available
  78.    "free" memory, i.e.
  79.  
  80.                   cat /proc/meminfo
  81.  
  82.    Free memory reported in meminfo is a worst case.  Linux uses a
  83.    unified memory pool for programs and disk cache.  A large amount
  84.    of memory may be available to TDE in the disk cache buffer, but
  85.    is not reported to the user in the TDE modeline.
  86.  
  87.  
  88.  
  89. 5) TDE works much better with ncurses 1.8.5.  Some of the older versions
  90.    of ncurses will work, but the colors may be off.
  91.